//公司图片的hover效果
var outside = $(".company-container-top .company-outside");
var list = $(".company-container-top .company-list");
for(var i = 0; i < list.length; i++){
	list[i].onmouseover = function(index){
		return function(){
			outside[index].style.display = "block"
		}
	}(i);
	list[i].onmouseout = function(index){
		return function(){
			outside[index].style.display = "none"
		}
	}(i);
}

//图片切换
var banner = document.getElementById('company-banner');
var pre = document.getElementById('pre');
var next = document.getElementById('next');
var j = 0;
var positions = [ '0px',-1140 * 1 + 'px', -1150 * 2 + 'px', -1155 * 3 + 'px'];
function nextGroup(){
	pre.style.display = "block";
	j++;
	banner.style.transition = 'transform 1s';
	banner.style.transform = 'translate(' + positions[j] + ', 0px)';
	if(j == 3){
		next.style.display = "none";
	}
}
function preGroup(){
	next.style.display = "block";
	j--;
	banner.style.transition = 'transform 1s';
	banner.style.transform = 'translate(' + positions[j] + ', 0px)';
	if(j == 0){
		pre.style.display = "none";
	}
}
next.onclick = function(){
	nextGroup();
}
pre.onclick = function (){
	preGroup();
}

//排序方式点击高亮
var sortWays = $("#sortWays li a");
sortWays.click(function() {
	sortWays.removeClass("active3");
	$(this).addClass("active3");
})

//页数点击的高亮
var page = $("#page li");
page.click(function() {
	page.removeClass("active");
	$(this).addClass("active");
})
